package com.fg.cloud.manager.mapper.system;

import java.util.List;
import java.util.Map;

import com.fg.cloud.common.PageUtils;
import com.fg.cloud.manager.entry.system.CodeRulesEntity;
import com.fg.cloud.manager.entry.system.CoderulesPurposeEntity;
import com.fg.cloud.manager.entry.system.vo.CodeRulesVo;

public interface CodeRulesMapper {

	List<CodeRulesVo> findRules(Map<String, Object> usmap);

	void updateCurrentNumber(Map<String, Object> usmap);

	String findOrderNo(Map<String, Object> usmap);

	String findDeliveryNo(Map<String, Object> usmap);

	String findReturnNo(Map<String, Object> usmap);

	String findRecordNo(Map<String, Object> usmap);

	/**
	 * 新增详情
	 * */
	void insertDatels(CodeRulesEntity codeRulesEntity);

	/**
	 * 新增规则
	 * */
	Long insertRule(CoderulesPurposeEntity cpe);

	/**
	 * 删除详情
	 * */
	void deleteDatels(Map<String, Object> usmap);

	/**
	 * 相处规则头
	 * */
	Integer deleteRules(Map<String, Object> usmap);

	/**
	 * 查询规则头数量
	 * */
	Long findRulesCount(PageUtils<CoderulesPurposeEntity> pageinfo);

	/**
	 *查询规则头
	 * */
	List<CoderulesPurposeEntity> rulesList(PageUtils<CoderulesPurposeEntity> pageinfo);

	/**
	 * 通过id查规则详情
	 * */
	CoderulesPurposeEntity findRulesById(Map<String, Object> usmap);

	/**
	 * 通过facid和purposeId查
	 * */
	Integer findByPurposeId(Map<String, Object> usmap);

	/**
	 * 修改
	 * */
	Integer updateCodeRules(CoderulesPurposeEntity cpe);

}
